package com.franklin.ideaplugin.api.beans;

import com.intellij.psi.PsiClass;
import org.jetbrains.annotations.NotNull;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * 包含泛型的类
 *
 * @author Ye Junhui
 * @since 2023/1/13 0013
 */
public class GenericClass implements Serializable {

    private static final long serialVersionUID = -8242422083088395217L;
    /**
     * 类psi
     */
    private PsiClass psiClass;

    /**
     * 类全称
     */
    private String qualifiedName;

    /**
     * 泛型参数列表
     */
    private List<GenericParameter> genericParameterList = Collections.emptyList();

    public GenericClass(@NotNull PsiClass psiClass, List<GenericParameter> genericParameterList) {
        this.psiClass = psiClass;
        this.qualifiedName = psiClass.getQualifiedName();
        this.genericParameterList = genericParameterList;
    }

    public PsiClass getPsiClass() {
        return psiClass;
    }

    public String getQualifiedName() {
        return qualifiedName;
    }

    public List<GenericParameter> getGenericParameterList() {
        return genericParameterList;
    }
}
